//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat 
             History:        2023/2/7
************************************************************/

#include <stdio.h>

int main()
{
    int num = 0;
    printf("请输入一个数:>");
    scanf("%d",&num);
    
    printf("奇数位：");
    for (int i = 31; i >= 1; i -= 2)
    {
        printf("%d ", (num >> i) & 1);
    }
    printf("\n");
    
    printf("偶数位：");
    for (int i = 30; i >= 0; i -= 2)
    {
        printf("%d ", (num >> i) & 1);
    }
    printf("\n");

    return 0;
}

